<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta charset="utf-8" />
    <title>后台管理首页</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
    <!-- bootstrap & fontawesome -->
    <link rel="stylesheet" href="__STATIC__/assets/css/bootstrap.min.css" />
    <link rel="stylesheet" href="__STATIC__/assets/font-awesome/4.2.0/css/font-awesome.min.css" />
    <link rel="stylesheet" href="__STATIC__/assets/css/colorpicker.min.css" />
    <link rel="stylesheet" href="__STATIC__/MyDate/skin/WdatePicker.css" />

    <!-- text fonts -->
    <link rel="stylesheet" href="__STATIC__/assets/fonts/fonts.googleapis.com.css" />

    <!-- ace styles -->
    <link rel="stylesheet" href="__STATIC__/assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />

    <!--[if lte IE 9]>
    <link rel="stylesheet" href="__STATIC__/assets/css/ace-part2.min.css" class="ace-main-stylesheet" />
    <![endif]-->

    <!--[if lte IE 9]>
    <link rel="stylesheet" href="__STATIC__/assets/css/ace-ie.min.css" />
    <![endif]-->
    <!-- ace settings handler -->
    <script src="__STATIC__/assets/js/ace-extra.min.js"></script>
    <script src="__STATIC__/assets/js/jquery.2.1.1.min.js"></script>
    <!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

    <!--[if lte IE 8]>
    <script src="__STATIC__/assets/js/html5shiv.min.js"></script>
    <script src="__STATIC__/assets/js/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" href="__STATIC__/core/art.dialog.css">
    <link rel="stylesheet" href="__STATIC__/assets/css/cltphp.css" />
    <script language="JavaScript">
        <!--
        var URLO= "{:url('Admin/Attachment/index')}";
        var URL = '/index.php/admin/article';
        var APP	 =	 '/index.php';
        var PUBLIC = '/public';
        //-->
    </script>
</head>

<body class="no-skin">
<div id="navbar" class="navbar navbar-default navbar-fixed-top">
    <script type="text/javascript">
        try{ace.settings.check('navbar' , 'fixed')}catch(e){}
    </script>

    <div class="navbar-container" id="navbar-container">
        <button type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler" data-target="#sidebar">
            <span class="sr-only">Toggle sidebar</span>

            <span class="icon-bar"></span>

            <span class="icon-bar"></span>

            <span class="icon-bar"></span>
        </button>

        <div class="navbar-header pull-left">
            <a href="index.html" class="navbar-brand">
                <small>
                    <i class="fa fa-leaf"></i>
                    {:config('sys_name')}后台管理
                </small>
            </a>
        </div>

        <div class="navbar-buttons navbar-header pull-right" role="navigation">
            <ul class="nav ace-nav">
                <li class="green">
                    <a href="{:url('index/Index/index')}" target="_blank">
                        网站首页
                    </a>
                </li>
                <li class="light-blue">
                    <a data-toggle="dropdown" href="#" class="dropdown-toggle">
                        <img class="nav-user-photo" src="__STATIC__/assets/avatars/avatar7.png" alt="{:session('username')}" />
                            <span class="user-info">
                                <small>欢迎您,</small>
                                {:session('username')}
                            </span>
                        <i class="ace-icon fa fa-caret-down"></i>
                    </a>

                    <ul class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
                        <li>
                            <a href="{:url('Sys/adminEdit',array('admin_id'=>session('aid')))}">
                                <i class="ace-icon fa fa-cog"></i>
                                个人设置
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a style="cursor:pointer;" id="cache" >
                                <i class="ace-icon fa fa-user"></i>
                                清除缓存
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="javascript:;"  id="logout">
                                <i class="ace-icon fa fa-power-off"></i>
                                注销
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </div><!-- /.navbar-container -->
</div>
<script type="text/javascript">
    $(document).ready(function(){
        $("#logout").click(function(){
            layer.confirm('你确定要退出吗？', {icon: 3}, function(index){
                layer.close(index);
                window.location.href="{:url('login/logout')}";
            });
        });
    });

    $(function(){
        $('#cache').click(function(){
            layer.confirm('确认要清除缓存？', {icon: 3}, function(data){
                $.post('{:url("clear")}',{},function(data){
                    layer.msg(data.info, {icon: 6}, function (index) {
                        layer.close(index);
                        window.location.href = data.url;
                    });
                });
            });
        });
    });
</script>


